// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'

Vue.config.productionTip = false

/* eslint-disable no-new */
// new Vue({
//   el: '#app',
//   components: { App },
//   template: '<App/>'
// })
new Vue({
  el: '#app',
  data: {
    title: 'Hello vuejs',
    subTitle: 'Vue Angular React is good',
    showSub: true,
    myTodo: '',
    todos: [
      {
        text: '吃饭', done: false
      },
      {
        text: '睡觉', done: false
      },
      {
        text: '写代码', done: false
      }
    ]
  },
  methods: {
    pushTodo () {
      this.todos.push({
        text: this.myTodo,
        done: false
      })
    },
    toogle (index) {
      this.todos[index].done = !this.todos[index].done
    }
  }
})
